@extends('admin.layout.common')
@section('content')
    <link rel="stylesheet" type="text/css" href="{{URL::asset('css/user/RoleManagement.css')}}">
    <div class="content">
    <h1 class="h1">赋予角色</h1>
    <table border="1" width="100%">
        <tr>
            <th>ID</th>
            <th>部门名称</th>
            <th>状态</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
        @foreach($list as $v)
            <tr>
                <td>{{$v['id']}}</td>
                <td>{{$v['name_cn']}}</td>
                <td>{{$v['auth_text']}}</td>
                <td>{{$v['create_time']}}</td>
                <td>
                    @if($v['authStatus']=='1')
                    <input type="button" name="" value="解除该角色" onclick="javascript:window.location.href='{{URL('admin/removeRoleByDepartment/'.$v['id'].'/'.$role_id)}}'">
                    @else
                    <input type="button" name="" value="赋予该角色" onclick="javascript:window.location.href='{{URL('admin/addRoleByDepartment/'.$v['id'].'/'.$role_id)}}'">
                    @endif
                </td>
            </tr>
        @endforeach
    </table>
        {{--{{ $list->links() }}--}}
    </div>
    @endsection
<script type="text/javascript" src="{{URL::asset('js/user/personal.js')}}"></script>

